package vincent.com.layouttest.surface;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.LinearLayout;

import vincent.com.layouttest.R;

/**
 * Created by zvin-chen on 16/4/9.
 */
public class SurfaceViewActivity extends AppCompatActivity {

    private ExampleSurfaceView mSurfaceView;

    private LinearLayout mContainer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        /*setContentView(R.layout.activity_surfaceview);

        mContainer = (LinearLayout)findViewById(R.id.container);

        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(100, 100);
        mSurfaceView = new ExampleSurfaceView(this);

        mContainer.addView(mSurfaceView, params);*/
//        setContentView(new ExampleSurfaceView(this));

        setContentView(R.layout.activity_surface_view);
    }

    @Override
    protected void onPause() {
        super.onPause();
/*
        if(mSurfaceView != null){
            mSurfaceView.onPause();
        }*/
    }

    @Override
    protected void onResume() {
        super.onResume();
        /*if(mSurfaceView != null){
            mSurfaceView.onResume();
        }*/
    }
}
